<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    <script>
    function Human(){
        this.name = "张三"
        this.show = function(){
            alert("我的名字叫"+this.name)
        }
    }

    function Man(){
        this.play = function(){
            alert("男人喜欢选亚索")
        }
    }
    //一个原型对象是另外一个构造函数的实例.
    Man.prototype = new Human(); //继承

    let s = new Man()
    s.show()
    s.play()
    //缺点：在创建对象的时候无法传参

    </script>
</body>
</html>